<html>
<head><meta charset="utf-8"><title>convenient way to enable polymorphization tests · t-compiler/wg-polymorphization · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/index.html">t-compiler/wg-polymorphization</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html">convenient way to enable polymorphization tests</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222709131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/convenient%20way%20to%20enable%20polymorphization%20tests/near/222709131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html#222709131">(Jan 14 2021 at 12:15)</a>:</h4>
<p>How do I run the rustc test suite with <code>-Zpolymorphize</code>? Do I need <code>RUSTFLAGS</code> or is there something more convenient like the system we had for mir borrowck?</p>



<a name="222709495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/convenient%20way%20to%20enable%20polymorphization%20tests/near/222709495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html#222709495">(Jan 14 2021 at 12:21)</a>:</h4>
<p>I tend to just toggle the option's default in <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/options.rs#L1039"><code>rustc_session</code></a> since compiling polymorphized libstd will tend to highlight bugs that the test suite doesn't (I'll always add a minimal test for things that I discover that way but libstd is still better at breaking polymorphization in new ways than the test suite).</p>
<p><code>bootstrap</code> would need some changes to have a test suite with multiple compare modes (fairly straightforward changes, just not ones that I've completed, <a href="https://github.com/rust-lang/rust/blob/f3eead1c69d5ce9cb128a9068250581ad28103f0/src/bootstrap/test.rs#L865-L870">relevant code</a>), since NLL is already there.</p>



<a name="222709640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/convenient%20way%20to%20enable%20polymorphization%20tests/near/222709640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html#222709640">(Jan 14 2021 at 12:23)</a>:</h4>
<p>thx, doing  that now</p>



<a name="222709889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/convenient%20way%20to%20enable%20polymorphization%20tests/near/222709889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html#222709889">(Jan 14 2021 at 12:27)</a>:</h4>
<p>I looked at allowing multiple compare modes when doing split dwarf and it's definitely feasible - the compare mode invocation is performed at the end of the relevant function by just appending a new flag to the existing <code>Command</code>, but there's no way to remove that flag to add another (and compiletest will be angry if you repeat a flag) or clone the original command pre-compare-mode-flag. After digging that far, I decided that testing split dwarf in both modes probably wasn't the most important thing and went back to solving actual split dwarf bugs.</p>



<a name="222710049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/convenient%20way%20to%20enable%20polymorphization%20tests/near/222710049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/convenient.20way.20to.20enable.20polymorphization.20tests.html#222710049">(Jan 14 2021 at 12:29)</a>:</h4>
<p>Alternatively, I could probably just remove the NLL compare mode - I'll make a note to look into doing that (if it makes sense to).</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>